package com.kiwi.util;

import java.util.HashMap;

/**
 * Created by Administrator on 2018/4/17.
 */
public class ConcatUtil {
    public static String concatParams(HashMap<String,String> params) {
        String paramStr = "";
        for (String key : params.keySet()) {
            paramStr = paramStr + key + "=" + params.get(key).concat("&");
        }
        paramStr = paramStr.substring(0,paramStr.length()-1);
        return paramStr;
    }
    public static void main(String[] argv){
        HashMap params = new HashMap();
        params.put("accountId","9000000");
        params.put("sex","10");
        params.put("age","11");
        System.out.println(concatParams(params));

    }
}
